\(\int \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \, dx\) [143]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 32 \[ \int \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \, dx=\frac {\sqrt {b \cos (c+d x)} \sin (c+d x)}{d \sqrt {\cos (c+d x)}} \]

[Out]

sin(d*x+c)*(b*cos(d*x+c))^(1/2)/d/cos(d*x+c)^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {17, 2717} \[ \int \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \, dx=\frac {\sin (c+d x) \sqrt {b \cos (c+d x)}}{d \sqrt {\cos (c+d x)}} \]

[In]

Int[Sqrt[Cos[c + d*x]]*Sqrt[b*Cos[c + d*x]],x]

[Out]

(Sqrt[b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])

Rule 17

Int[(u_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Dist[a^(m + 1/2)*b^(n - 1/2)*(Sqrt[b*v]/Sqrt[a*v])
, Int[u*v^(m + n), x], x] /; FreeQ[{a, b, m}, x] &&  !IntegerQ[m] && IGtQ[n + 1/2, 0] && IntegerQ[m + n]

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {b \cos (c+d x)} \int \cos (c+d x) \, dx}{\sqrt {\cos (c+d x)}} \\ & = \frac {\sqrt {b \cos (c+d x)} \sin (c+d x)}{d \sqrt {\cos (c+d x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00 \[ \int \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \, dx=\frac {\sqrt {b \cos (c+d x)} \sin (c+d x)}{d \sqrt {\cos (c+d x)}} \]

[In]

Integrate[Sqrt[Cos[c + d*x]]*Sqrt[b*Cos[c + d*x]],x]

[Out]

(Sqrt[b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])

Maple [A] (verified)

Time = 3.07 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.91

method result size
default \(\frac {\sin \left (d x +c \right ) \sqrt {\cos \left (d x +c \right ) b}}{d \sqrt {\cos \left (d x +c \right )}}\) \(29\)
risch \(-\frac {i \sqrt {\cos \left (d x +c \right ) b}\, \left (\sqrt {\cos }\left (d x +c \right )\right ) {\mathrm e}^{2 i \left (d x +c \right )}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) d}+\frac {i \sqrt {\cos \left (d x +c \right ) b}\, \left (\sqrt {\cos }\left (d x +c \right )\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) d}\) \(85\)

[In]

int(cos(d*x+c)^(1/2)*(cos(d*x+c)*b)^(1/2),x,method=_RETURNVERBOSE)

[Out]

sin(d*x+c)*(cos(d*x+c)*b)^(1/2)/d/cos(d*x+c)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.88 \[ \int \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \, dx=\frac {\sqrt {b \cos \left (d x + c\right )} \sin \left (d x + c\right )}{d \sqrt {\cos \left (d x + c\right )}} \]

[In]

integrate(cos(d*x+c)^(1/2)*(b*cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

sqrt(b*cos(d*x + c))*sin(d*x + c)/(d*sqrt(cos(d*x + c)))

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (29) = 58\).

Time = 1.30 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.88 \[ \int \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \, dx=\begin {cases} x \sqrt {b \cos {\left (c \right )}} \sqrt {\cos {\left (c \right )}} & \text {for}\: d = 0 \\0 & \text {for}\: c = - d x + \frac {\pi }{2} \vee c = - d x + \frac {3 \pi }{2} \\\frac {\sqrt {b \cos {\left (c + d x \right )}} \sin {\left (c + d x \right )}}{d \sqrt {\cos {\left (c + d x \right )}}} & \text {otherwise} \end {cases} \]

[In]

integrate(cos(d*x+c)**(1/2)*(b*cos(d*x+c))**(1/2),x)

[Out]

Piecewise((x*sqrt(b*cos(c))*sqrt(cos(c)), Eq(d, 0)), (0, Eq(c, -d*x + pi/2) | Eq(c, -d*x + 3*pi/2)), (sqrt(b*c
os(c + d*x))*sin(c + d*x)/(d*sqrt(cos(c + d*x))), True))

Maxima [A] (verification not implemented)

none

Time = 0.44 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.41 \[ \int \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \, dx=\frac {\sqrt {b} \sin \left (d x + c\right )}{d} \]

[In]

integrate(cos(d*x+c)^(1/2)*(b*cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

sqrt(b)*sin(d*x + c)/d

Giac [A] (verification not implemented)

none

Time = 0.54 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.97 \[ \int \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \, dx=\frac {2 \, \sqrt {b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{d \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + d} \]

[In]

integrate(cos(d*x+c)^(1/2)*(b*cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

2*sqrt(b)*tan(1/2*d*x + 1/2*c)/(d*tan(1/2*d*x + 1/2*c)^2 + d)

Mupad [B] (verification not implemented)

Time = 14.17 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.38 \[ \int \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \, dx=\frac {\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (2\,c+2\,d\,x\right )\,\sqrt {b\,\cos \left (c+d\,x\right )}}{d\,\left (\cos \left (2\,c+2\,d\,x\right )+1\right )} \]

[In]

int(cos(c + d*x)^(1/2)*(b*cos(c + d*x))^(1/2),x)

[Out]

(cos(c + d*x)^(1/2)*sin(2*c + 2*d*x)*(b*cos(c + d*x))^(1/2))/(d*(cos(2*c + 2*d*x) + 1))